--SELECT * FROM cv_careergoal
--DELETE FROM cv_careergoal
INSERT INTO cv_careergoal
SELECT
case len(convert(varchar(10),id))
    when 6 then '00000000-0000-0000-0000-000000' + convert(varchar(10),id)
    when 5 then '00000000-0000-0000-0000-0000000' + convert(varchar(10),id) 
    when 4 then '00000000-0000-0000-0000-00000000' + convert(varchar(10),id) 
    when 3 then '00000000-0000-0000-0000-000000000' + convert(varchar(10),id) 
    when 2 then '00000000-0000-0000-0000-0000000000' + convert(varchar(10),id) 
    when 1 then '00000000-0000-0000-0000-00000000000'+ convert(varchar(10),id) 
    end As Id,wantjobtype AS [JobTypes],wantwrokAreaCity AS [DesiredRegions],wantindustry AS [Industries],wantjobfstclass AS [Categories],companychar AS [CompanyTypes],salarylevel AS [SalaryRange],salaryvalue AS [DesiredSalary],NULL AS [CanStart],NULL AS [StartOn],'00000000-0000-0000-0000-00000' + convert(varchar(7),resumeid) AS  [ResumeId],createddate AS [DateCreated],updateddate AS [LastUpdated]FROM srv_lnk.nchr2008.dbo.ResumeJob
where resumeid in (select right(id,7) from cv_resume)

--SELECT TOP 10 * FROM srv_lnk.nchr2008.dbo.ResumeJob
